Skip to content

AVRO-2262 Java compression codec improvements#352

Merged
Fokko merged 1 commit intoapache:masterfrom
jacobtolar:more-compression-improvements
Nov 12, 2018
Merged

AVRO-2262 Java compression codec improvements#352
Fokko merged 1 commit intoapache:masterfrom
jacobtolar:more-compression-improvements

Conversation

@jacobtolar
Copy link
Contributor

  • Update a few things to use try-with-resources
  • Updated CodecFactory to reference constants for codec names
  • Fixed a small bug in Snappy and BZip2: compression/decompression were incorrect if the input ByteBuffer was a a slice(). I don't see anywhere that this would actually happen currently, but some codecs were written to account for this correctly; now they're all correct. Updated everything to compute the correct offset into the underlying array. (I can add a test for this in TestAllCodecs once [AVRO-2245] Improve java tests for compression codecs #351 is merged).

I can file a matching JIRA for this if desired.

@Fokko
Copy link
Contributor

Fokko commented Nov 7, 2018

Can you rebase and open a Jira for this PR? Thanks!

@kojiromike
Copy link
Contributor

I think the JIRA is already open. Please update the title of this PR with AVRO-2245 to link it automatically.

@jacobtolar
Copy link
Contributor Author

I filed AVRO-2245 because the test was broken, see the other PR (#351).

This is a different change (some code cleanup and a fix to the codec code when reading from the middle of the buffer). I guess I can file a new JIRA with the details of the issue that is fixed here.

@jacobtolar jacobtolar force-pushed the more-compression-improvements branch from ab2db0a to 1ec69a5 Compare November 7, 2018 15:49
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacobtolar Please supply a ticket. The changes look great.

@Fokko Fokko changed the title various minor java compression codec improvements AVRO-2262 Java compression codec improvements Nov 12, 2018
@Fokko Fokko merged commit 07bd95a into apache:master Nov 12, 2018
@jacobtolar
Copy link
Contributor Author

Sorry, I hadn't gotten back around to this yet. Thanks for merging.

I'll have to send a separate PR with the unit test I was going to add to this branch once #351 was merged.

@Fokko
Copy link
Contributor

Fokko commented Nov 12, 2018

Thanks @jacobtolar

Fokko pushed a commit that referenced this pull request Nov 12, 2018
scottcarey pushed a commit to scottcarey/avro that referenced this pull request Mar 21, 2019
AVRO-2262 Java compression codec improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants